#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>

using namespace std;
using namespace cv;

int main(int argc, char** argv) {
  // 创建空白图片
  Mat m1 = Mat::zeros(Size(400,400), CV_8UC3);
  m1 = Scalar(0, 0, 255);

  std::cout << "width: " << m1.cols << " height: " << m1.rows << 
      " channels: " << m1.channels() << std::endl;  
  
  Mat m2;
  m1.copyTo(m2);
  m2 = Scalar(0, 255, 255);
  imshow("图像1", m1);
  imshow("图像2", m2);
  waitKey(0);
  cv::destroyAllWindows();
  
  return 0;
} 